package com.im;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MDA {
	// ======================以下是常量配置
	/**
	 * 成功
	 */
	public static final String RESULT_SUCCESS = new String("0");

	/**
	 * 失败
	 */
	public static final String RESULT_FAIL = new String("-1");

	// 加密IV
	public final static String AES_IV = new String("0102030405060708");
	// 系统管理员角色
	public final static String ROLE_SYSTEM_MANAGE = new String("90");

	public final static String SEESION_KEY = new String("loginedStaff");
	public final static String USER_ROLE_KEY = new String("USER_ROLE");

	// ======================以下是开关配置

	// 是否进行session验证
	public final static String SWITCH_CHECK_SESSION = new String("Y");
	// 是否进行启动压缩混淆js.css
	public final static String SWITCH_COMPRESSOR_JS_AND＿CSS = new String("Y");
	// 是否启动出入参加密解密传输
	public final static String SWITCH_AES_ENCRIPT_DECRIPT = new String("N");
	// 是否开启账号登录只能一个用户使用
	public final static String SWITCH_LOGIN_ONCE_SAME_TIME = new String("Y");

	// ========================以下是路劲配置
	/**
	 * 解压混淆的路劲
	 */
	public final static List<String> DIR_LIST_FOR_YUICOMPRESSOR = new ArrayList<>();

	static {
		DIR_LIST_FOR_YUICOMPRESSOR.add("js");
		DIR_LIST_FOR_YUICOMPRESSOR.add("pages");
		DIR_LIST_FOR_YUICOMPRESSOR.add("css");
	}
	/**
	 * 暴露的公共服务，不需要验证session,权限等
	 */
	public final static List<String> URL_LIST_FOR_PUBLIC = new ArrayList<>();
	static {
		URL_LIST_FOR_PUBLIC.add("loginController/login");
		URL_LIST_FOR_PUBLIC.add("loginController/getValidCode");
		URL_LIST_FOR_PUBLIC.add("loginController/validate");

		URL_LIST_FOR_PUBLIC.add("/InfoManageWeb/error");
		URL_LIST_FOR_PUBLIC.add("loginController/noPermisssion");
	}

	/**
	 * 需要校验权限的，菜单url
	 */
	public final static List<String> URL_LIST_FOR_PERMISSION = new ArrayList<>();
	static {
		URL_LIST_FOR_PERMISSION.add("userController/index");

		URL_LIST_FOR_PERMISSION.add("userController/userManage");
		URL_LIST_FOR_PERMISSION.add("userController/roleManage");
		URL_LIST_FOR_PERMISSION.add("userController/unitManage");
		URL_LIST_FOR_PERMISSION.add("userController/constantManage");
		URL_LIST_FOR_PERMISSION.add("userController/menuManage");
		URL_LIST_FOR_PERMISSION.add("userController/fileTempManage");

		URL_LIST_FOR_PERMISSION.add("projectInfoManageController/planeProjectManage");
		URL_LIST_FOR_PERMISSION.add("projectInfoManageController/carrayProjectManage");
		URL_LIST_FOR_PERMISSION.add("projectInfoManageController/needProgressManage");
		URL_LIST_FOR_PERMISSION.add("projectInfoManageController/itemSubmitManage");
		URL_LIST_FOR_PERMISSION.add("projectInfoManageController/itemStaticManage");

		URL_LIST_FOR_PERMISSION.add("folderManageController/folderInfoManage");
		URL_LIST_FOR_PERMISSION.add("folderManageController/folderBorrowManage");
		URL_LIST_FOR_PERMISSION.add("folderManageController/folderStaticManage");

		URL_LIST_FOR_PERMISSION.add("purchaseController/purchasePlanManage");

		URL_LIST_FOR_PERMISSION.add("tenderPreparationController/tenderPreparationManage");
		URL_LIST_FOR_PERMISSION.add("invitManageController/invitManage");
		URL_LIST_FOR_PERMISSION.add("letterAcceptManageController/letterAcceptManage");
		URL_LIST_FOR_PERMISSION.add("invitInfoManageController/invitInfoManage");

		URL_LIST_FOR_PERMISSION.add("contractController/contractSignManage");
		URL_LIST_FOR_PERMISSION.add("contractController/contractService");
		URL_LIST_FOR_PERMISSION.add("contractController/contractExamine");
		URL_LIST_FOR_PERMISSION.add("contractController/changeApply");
		URL_LIST_FOR_PERMISSION.add("contractController/changeExamine");

		URL_LIST_FOR_PERMISSION.add("measureReportController/measureReportManage");
		URL_LIST_FOR_PERMISSION.add("countExamineController/countExamine");
		URL_LIST_FOR_PERMISSION.add("countPayController/countPay");
		URL_LIST_FOR_PERMISSION.add("countStaticController/countStatic");

		URL_LIST_FOR_PERMISSION.add("investPlanController/inverstApply");
		URL_LIST_FOR_PERMISSION.add("investPlanController/inverstWrite");
		URL_LIST_FOR_PERMISSION.add("investPlanController/inverstFirstTrial");
		URL_LIST_FOR_PERMISSION.add("investPlanController/inverstAlign");
		URL_LIST_FOR_PERMISSION.add("investPlanController/inverstStatic");

		URL_LIST_FOR_PERMISSION.add("moneyPlaneManageController/moneyApply");
		URL_LIST_FOR_PERMISSION.add("moneyPlaneManageController/moneyWrite");
		URL_LIST_FOR_PERMISSION.add("moneyPlaneManageController/moneyFirstTrial");
		URL_LIST_FOR_PERMISSION.add("moneyPlaneManageController/moneyAlign");
		URL_LIST_FOR_PERMISSION.add("moneyPlaneManageController/moneyStatic");

		URL_LIST_FOR_PERMISSION.add("fixedMoneySetController/fixedMoneySet");
		URL_LIST_FOR_PERMISSION.add("fixedMoneyManageController/fixedMoneyManage");
		URL_LIST_FOR_PERMISSION.add("fixedMoneyExamineController/fixedMoneyExamine");
		URL_LIST_FOR_PERMISSION.add("fixedMoneyStaticController/fixedMoneyStatic");

		URL_LIST_FOR_PERMISSION.add("userController/passwordChange");
		URL_LIST_FOR_PERMISSION.add("userController/passwordReset");

	}

	/******************************** 资金来源对象类型 ***************************************/
	/**
	 * 规划项目
	 */
	public final static String FUND_SOURCE_OBJ_TYPE_PLAN = new String("10");
	/**
	 * 实施项目
	 */
	public final static String FUND_SOURCE_OBJ_TYPE_IMPLEMENT = new String("20");
	/**
	 * 投资计划
	 */
	public final static String FUND_SOURCE_OBJ_TYPE_INVEST = new String("30");
	public final static String FUND_SOURCE_OBJ_TYPE_INVEST_ADD = new String("301");
	public final static String FUND_SOURCE_OBJ_TYPE_INVEST_TRIAL = new String("302");
	public final static String FUND_SOURCE_OBJ_TYPE_INVEST_ALIGN = new String("303");

    public final static String FUND_SOURCE_OBJ_TYPE_INVEST_301 = new String("301");
    public final static String FUND_SOURCE_OBJ_TYPE_INVEST_302 = new String("302");
    public final static String FUND_SOURCE_OBJ_TYPE_INVEST_303 = new String("303");

    public final static String FUND_SOURCE_OBJ_TYPE_FUND = new String("40");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_401 = new String("401");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_402 = new String("402");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_403 = new String("403");

	/**
	 * 固定资产
	 */
	public final static String FUND_SOURCE_OBJ_TYPE_FUND_501 = new String("501");

    /**    public final static String FUND_SOURCE_OBJ_TYPE_FUND = new String("40");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_401 = new String("401");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_402 = new String("402");
    public final static String FUND_SOURCE_OBJ_TYPE_FUND_403 = new String("403");

    /**
	public final static String FUND_SOURCE_OBJ_TYPE_FUND = new String("40");
	/**
	 * 项目阶段
	 */
	public final static String FUND_SOURCE_OBJ_TYPE_STAGE = new String("50");
	/******************************** 资金来源类型 ***************************************/
	/**
	 * 10:部补助
	 */
	public final static String FUND_SOURCE_TYPE_BU = new String("10");
	/**
	 * 20:省财政
	 */
	public final static String FUND_SOURCE_TYPE_SHENG = new String("20");
	/**
	 * 30:高速水运融资
	 */
	public final static String FUND_SOURCE_TYPE_GAO = new String("30");
	/**
	 * 40:市州配套
	 */
	public final static String FUND_SOURCE_TYPE_SHI = new String("40");
	/**
	 * 50:企业自筹
	 */
	public final static String FUND_SOURCE_TYPE_QI = new String("50");
	public final static String FUND_SOURCE_TYPE_OTHER = new String("60");
	/******************************** 规划工程状态 ***************************************/
	/** 规划工程状态-未启用 **/
	public final static Integer PLAN_PROJ_STATUS_CD_NOT_ENABLED = new Integer(10);
	/** 规划工程状态-进行中 **/
	public final static Integer PLAN_PROJ_STATUS_CD_UNDERWAY = new Integer(20);
	/** 规划工程状态-暂停 **/
	public final static Integer PLAN_PROJ_STATUS_CD_PAUSE = new Integer(30);
	/** 规划工程状态-作废 **/
	public final static Integer PLAN_PROJ_STATUS_CD_DELETE = new Integer(40);
	/** 规划工程状态-完成 **/
	public final static Integer PLAN_PROJ_STATUS_CD_COMPLETE = new Integer(50);
	/******************************** 实施工程状态 ***************************************/
	/** 实施工程状态-未启用 **/
	public final static Integer IMPLE_PROJ_STATUS_CD_NOT_ENABLED = new Integer(10);
	/** 实施工程状态-进行中 **/
	public final static Integer IMPLE_PROJ_STATUS_CD_UNDERWAY = new Integer(20);
	/** 实施工程状态-暂停 **/
	public final static Integer IMPLE_PROJ_STATUS_CD_PAUSE = new Integer(30);
	/** 实施工程状态-作废 **/
	public final static Integer IMPLE_PROJ_STATUS_CD_DELETE = new Integer(40);
	/** 实施工程状态-完成 **/
	public final static Integer IMPLE_PROJ_STATUS_CD_COMPLETE = new Integer(50);
	/******************************** 文档来源类型 ***************************************/
	/** 文档来源类型-项目节点 **/
	public final static String DOC_SOURCE_TYPE_STAGENODE = new String("10");
	/**
	 * 数据状态：10有效
	 */
	public static final String EFFECT_STATUS_CD = new String("10");
	/**
	 * 数据状态：20失效
	 */
	public static final String INVALID_STATUS_CD = new String("20");

	/******************************** 计划申报设置类型 ***************************************/
	/**
	 * 规划工程设置
	 */
	public final static String DECLARE_RELA_TYPE_PLAN_PROJ = new String("10");
	/**
	 * 实施项目设置
	 */
	public final static String DECLARE_RELA_TYPE_IMPLE_PROJ = new String("20");
	/**
	 * 投资计划设置
	 */
	public final static String DECLARE_RELA_TYPE_INVEST_PLAN = new String("30");

	/******************************** 投资计划设置 ***************************************/
	public final static String DECLARE_RELA_TYPE_FUND_PLAN = new String("40");
	/*** 10：关闭 */
	public final static Integer FUND_PLAN_STATUS_CD_APPLY = new Integer(10);
	/*** 20：填报 */
	public final static Integer FUND_PLAN_STATUS_CD_WRITE = new Integer(20);
	/*** 30：待审核 */
	public final static Integer FUND_PLAN_STATUS_CD_WAIT = new Integer(30);
	/*** 40：初审通过 */
	public final static Integer FUND_PLAN_STATUS_CD_FIR = new Integer(40);
	/*** 50：初审不通过 */
	public final static Integer FUND_PLAN_STATUS_CD_FIR_REFUSE = new Integer(50);
	/*** 60：已下达 */
	public final static Integer FUND_PLAN_STATUS_CD_PASS = new Integer(60);
	public final static Integer FUND_PLAN_STATUS_CD_CANCEL = new Integer(70);

	public final static String DECLAE_SET_DOC_YES = new String("10");
	public final static String DECLAE_SET_DOC_NOT = new String("20");
	public final static String DECLAE_SET_DOC_CANCEL = new String("30");

	public final static String DEL_STATUS = new String("99");
	/******************************** 合同状态 ***************************************/
	/*** 10：待签订 */
	public final static Integer CONTRACT_STATUS_CD_TOBESIGNED = new Integer("10");
	/*** 20：已签订 */
	public final static Integer CONTRACT_STATUS_CD_SIGNED = new Integer("20");
	/*** 30：已完成 */
	public final static Integer CONTRACT_STATUS_CD_FINISHED = new Integer("30");
	public final static Integer CONTRACT_STATUS_CD_CANCELED = new Integer("40");

	/******************************** 合同分项状态 ***************************************/
	/*** 10：待审核 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_PENDING = new Integer("10");
	/*** 20：审核不通过 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_UNAPPROVED = new Integer("20");
	/*** 30：正常 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_APPROVED = new Integer("30");
	/*** 40：取消 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_CANCELED = new Integer("40");
	/*** 50：支付完成 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_PAYED = new Integer("50");
	/*** 60：变更中 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_CHANGING = new Integer("60");
	/*** 61：变更中 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_CHANGING2 = new Integer("61");
	/*** 70：已冲正 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_CORRECTED = new Integer("70");
	/*** 80：冲正 */
	public final static Integer CONTRACT_ITEM_STATUS_CD_CORRECT = new Integer("80");
	/******************************** 合同分项变更状态 ***************************************/
	/*** 10：待审核 */
	public final static Integer CONTRACT_ITEM_CHANGE_STATUS_CD_PENDING = new Integer("10");
	/*** 20：审核不通过 */
	public final static Integer CONTRACT_ITEM_CHANGE_STATUS_CD_UNAPPROVED = new Integer("20");
	/*** 30：正常 */
	public final static Integer CONTRACT_ITEM_CHANGE_STATUS_CD_APPROVED = new Integer("30");
	/*** 40：取消 */
	public final static Integer CONTRACT_ITEM_CHANGE_STATUS_CD_CANCELED = new Integer("40");

	public final static String CONTRACT_ITEM_DATA_TYPE_ORIGINAL = new String("O");

	public final static String CONTRACT_ITEM_DATA_TYPE_MOFIFY = new String("M");

	/******************************** 计划申报设置状态 ***************************************/
	/**
	 * 开放填报
	 */
	public final static Integer PLAN_DECLARE_SET_STATUS_CD_OPEN = new Integer(10);
	/**
	 * 关闭填报
	 */
	public final static Integer PLAN_DECLARE_SET_STATUS_CD_CLOSE = new Integer(20);
	/**
	 * 分页查询节点
	 */
	public final static String PAGE_QUERY_INFO = new String("pageInfo");

	public final static String PRE_CODE = new String("PRE_CODE");

	public final static Boolean IS_FROM_DB = new Boolean(true);

	public final static Map<String, String> TABLE_TYPE_SEQ = new HashMap<String, String>();
	static {
		TABLE_TYPE_SEQ.put("T_PLAN_PROJECT", "10");
		TABLE_TYPE_SEQ.put("T_IMPLEMENT_PROJECT", "20");
		TABLE_TYPE_SEQ.put("T_CONTRACT", "30");
		TABLE_TYPE_SEQ.put("T_FUND_PLAN", "40");
		TABLE_TYPE_SEQ.put("T_INVEST_PLAN", "50");
		TABLE_TYPE_SEQ.put("T_TENDER_INFO", "60");
		TABLE_TYPE_SEQ.put("T_PURCHASE_PLAN", "70");
		TABLE_TYPE_SEQ.put("T_NOTICE_MANAGE", "80");

	};
	public final static String DOC_MANAGE_RELA_OBJ_TYPE_TENDER = new String("10");

	// 文件后缀对应文件类型
	public final static Map<String, Object> FILE_UPLOAD_TYPE = new HashMap<>();
	static {
		FILE_UPLOAD_TYPE.put("doc", "20");
		FILE_UPLOAD_TYPE.put("docx", "20");
		FILE_UPLOAD_TYPE.put("xls", "20");
		FILE_UPLOAD_TYPE.put("xlsx", "20");
		FILE_UPLOAD_TYPE.put("ppt", "20");
		FILE_UPLOAD_TYPE.put("pptx", "20");
		FILE_UPLOAD_TYPE.put("pdf", "20");
		FILE_UPLOAD_TYPE.put("rar", "30");
		FILE_UPLOAD_TYPE.put("zip", "30");
		FILE_UPLOAD_TYPE.put("png", "10");
		FILE_UPLOAD_TYPE.put("jpg", "10");
		FILE_UPLOAD_TYPE.put("bmp", "10");
		FILE_UPLOAD_TYPE.put("jpeg", "10");
		FILE_UPLOAD_TYPE.put("gif", "10");
	}
	
	/**
	 * 半角英文逗号分隔符 批量操作分隔id
	 */
	public final static String SEPARATOR = new String(",");
	
	/******************************** 项目阶段状态 ***************************************/
	/*** 10：待启动 */
	public final static Integer PROJECT_STAGE_STATUS_CD_START = new Integer("10");
	/*** 20：进行中 */
	public final static Integer PROJECT_STAGE_STATUS_CD_UNDERWAY = new Integer("20");
	/*** 30：已完工 */
	public final static Integer PROJECT_STAGE_STATUS_CD_FINISH = new Integer("30");
	/*** 40：已删除 */
	public final static Integer PROJECT_STAGE_STATUS_CD_DELETE = new Integer("40");
	
	/**
	 * 按规则生成序列
	 */
	public final static Map<String,String> SEQ_TYPE = new HashMap<String,String>();
	static{
		SEQ_TYPE.put("1", "t_implement_project");
		SEQ_TYPE.put("2", "t_purchase_plan");
		//SEQ_TYPE.put("3", "t_doc_manage");
		SEQ_TYPE.put("3", "t_tender_info");
		SEQ_TYPE.put("4", "t_contract");
		SEQ_TYPE.put("5", "t_plan_project");
	}
	/******************************** 项目阶段类型 ***************************************/
	/**
	 * 前期工作阶段批复(PRE_WORK_APPROVALl)
	 */
	public final static String PROJECT_STAGE_TYPE_PRE_WORK = new String("10");
	
	/**
	 * 项目全过程阶段(PROJECT_STAGE)
	 */
	public final static String PROJECT_STAGE_TYPE_ALL = new String("20");
	/******************************** 项目阶段类型 ***************************************/
}
